#ifndef __COMM_DATA_IAP_H
#define __COMM_DATA_IAP_H

#include <stdint.h>
#include <stdlib.h>

#ifdef __cplusplus
 extern "C" {
#endif

void clearOTADownloadFlag(void);
int8_t sendIapAck(uint8_t u8SrcId, uint8_t ack_code, uint8_t* pu8Data, uint8_t u8Len);
int8_t commCmdIapBeginProc(uint8_t *pu8Data, uint8_t u8DataSize, uint8_t u8SrcId);
int8_t commCmdIapTransProc(uint8_t *pu8Data, uint8_t u8DataSize, uint8_t u8Index, uint8_t u8SrcId);
int8_t commCmdIapVerifyProc(uint8_t *pu8Data, uint8_t u8DataSize, uint8_t u8SrcId);
int8_t commCmdIapResetProc(uint8_t u8SrcId);
int8_t commCmdIapResetNowProc(uint8_t u8SrcId);
int8_t ecuIapWaitResetProc(void);

int8_t commCmdHostWritePnProc(uint8_t *pu8Data, uint8_t u8DataSize, uint8_t u8Index, uint8_t u8SrcId);
uint8_t get_ota_status(void);
void set_ota_status(uint8_t value);

#ifdef __cplusplus
}
#endif
#endif
